package com.cyt.work.divideclass.model.po;

import com.cyt.base.util.BaseUtil;
import com.cyt.base.util.DictCode;
import com.cyt.sys.model.po.SysUser;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 智能分班分班设置-智能分班分班设置实体类
 *
 * @author caideyong
 * @date 2019-12-20 14:24:06
 */
@Data
@NoArgsConstructor
@Table(name = "cyt_divideclass_rule")
public class DivideclassRule implements Serializable {

	/**
     * 主键
     */ 
	@Id
	private String id;

	/**
     * 班级数量
     */ 
	@Column(name = "CLASS_NUM")
	private String classNum;

	/**
     * 总分均衡
     */ 
	@Column(name = "IS_SCORE")
	private String isScore;

	/**
     * 总分误差
     */ 
	@Column(name = "TOTAL_ERROR")
	private String totalError;

	/**
     * 排名均衡
     */ 
	@Column(name = "IS_RANK")
	private String isRank;

	/**
     * 性别均衡
     */ 
	@Column(name = "IS_SEX")
	private String isSex;

	/**
     * 分班id
     */ 
	@Column(name = "DIVIDE_ID")
	private String divideId;

	/**
     * 创建时间
     */ 
	@Column(name = "CREATE_TIME")
	private Date createTime;

	/**
     * 创建人
     */ 
	@Column(name = "CREATOR")
	private String creator;

	/**
     * 删除标志
     */ 
	@Column(name = "REMOVE_TAG")
	private String removeTag;

	/**
	 * 创建对象
	 *
	 * @param sysUser 当前用户信息
	 * @author caideyong
	 * @date 2019-12-20 14:24:06
	 */
	public DivideclassRule(SysUser sysUser) {
		this.id = BaseUtil.uId();
		this.removeTag = DictCode.BASE_REMOVE_TAG_NORMAL;
		this.createTime = new Date();
		this.creator = sysUser.getId();
	}
}